**************************************************************************************************************************
*** The following code has been modified in order to create two tables:
*		1) a table adding four columns where winsorized income and winsorized profits are used as dependent variables,  
*		2) a table adding four columns where the inverse hyperbolic sine transformations of the variables income and profits are are used as dependent variables.
**************************************************************************************************************************

		maketable_t2  Trim_Income wins_Income log_Income Trim_Profits_30Days wins_Profits_30Days log_Profits if  Survey_Version!=5 &  Done==1 , /// 
		spec11( Winner_Quint_Rank_NS  ) ///
		spec21( Winner_Quint_Rank_NS_Tercile_3 Winner_Quint_Rank_NS_Tercile_2  ) ///
		cont($controls) ///
		table("${outtex}${date}_Returns_NoSelfRank_winsorizing.tex") ///
		het(Winner_Quint_Rank_NS)   ///
		type(tex) /// 
		footnote($footnote_t2_winsorizing ) ///
		prehead1($prehead1) prehead2($prehead2) /// 
		postheadpa("\hline \rule{0pt}{3ex} \hspace{-.16in}  \it{Panel A: Average MR Rank Value} \vspace{.05in} \\") ///
		postheadpb("\\ \hspace{-.1 in} \it{Panel B: Average MR Rank Tercile} \vspace{.05in} \\") ///
		title("Replicating Table 2 in Hussam et al. (2022b): Adding Winsorized Outcomes") label(rankmreffectfe_winsorizing)


		maketable_t2  Trim_Income log_Income IHS_Income Trim_Profits_30Days log_Profits IHS_Profits if  Survey_Version!=5 &  Done==1 , /// 
		spec11( Winner_Quint_Rank_NS  ) ///
		spec21( Winner_Quint_Rank_NS_Tercile_3 Winner_Quint_Rank_NS_Tercile_2  ) ///
		cont($controls) ///
		table("${outtex}${date}_Returns_NoSelfRank_IHS.tex") ///
		het(Winner_Quint_Rank_NS)   ///
		type(tex) /// 
		footnote($footnote_t2_IHS ) ///
		prehead1($prehead1) prehead2($prehead2) /// 
		postheadpa("\hline \rule{0pt}{3ex} \hspace{-.16in}  \it{Panel A: Average MR Rank Value} \vspace{.05in} \\") ///
		postheadpb("\\ \hspace{-.1 in} \it{Panel B: Average MR Rank Tercile} \vspace{.05in} \\") ///
		title("Replicating Table 2 in Hussam et al. (2022b): Adding IHS Transformation of Outcomes") label(rankmreffectfe_IHS)

			
/* The original code was as follows:
		maketable_t2  Trim_Income log_Income   Trim_Profits_30Days log_Profits  if  Survey_Version!=5 &  Done==1 , /// 
		spec11( Winner_Quint_Rank_NS  ) ///
		spec21( Winner_Quint_Rank_NS_Tercile_3 Winner_Quint_Rank_NS_Tercile_2  ) ///
		cont($controls) ///
		table("${outtex}${date}_Returns_NoSelfRank.tex") ///
		het(Winner_Quint_Rank_NS)   ///
		type(tex) /// 
		footnote("$footnote_s2 $footnote_d2  $footnote_o2" ) ///
		prehead1($prehead1) prehead2($prehead2) /// 
		postheadpa("\hline \rule{0pt}{3ex} \hspace{-.16in}  \it{Panel A: Average MR Rank Value} \vspace{.05in} \\") ///
		postheadpb("\\ \hspace{-.1 in} \it{Panel B: Average MR Rank Tercile} \vspace{.05in} \\") ///
		title("Do Peer Reports Predict True Marginal Returns to the Grant?") label(rankmreffectfe)
		
	*/	
